package com.example.thread;

public class SynCount {
    public void synMethed(){
        synchronized (this){
            for(int i=0; i<50; i++){
                System.out.println(Thread.currentThread().getName() + "执行行数：" + i);
            }
        }
    }

    public void synNoMethed(){
        for(int i=0; i<50; i++){
            System.out.println(Thread.currentThread().getName() + "执行行数：" + i);
        }
    }
}
